package com.newhis.pattern.chain;

/**
 * 业务聚合
 *
 * @version [V2.0]
 * @package com.newhis.newhisbase.pattern.chain;
 * @description:[用一句话描述该文件做什么]
 * @author: [zhuben]
 * @date: [2024-07-14 13:24]
 * @copyright: 2024 echovin.com
 */

public class LoggerMain {
    public static void main(String[] args) {
        WarnLogger warnLogger = WarnLogger.getInstance();
        warnLogger.logMessage(3, "11111");//错误日志可打印
        WarnLogger warnLogger2 = WarnLogger.getInstance();
        warnLogger2.logMessage(2, "22222");//info日志可打印
        WarnLogger warnLogger3 = WarnLogger.getInstance();
        warnLogger3.logMessage(1, "111111");//warn日志可打印

        InfoLogger infoLogger = InfoLogger.getInstance();
        infoLogger.logMessage(3, "11111");//错误日志可打印
        InfoLogger infoLogger2 = InfoLogger.getInstance();
        infoLogger2.logMessage(1, "11111");//警告日志不可打印

        ErrorLogger errorLogger = ErrorLogger.getInstance();
        errorLogger.logMessage(3, "33333");

    }
}
